package ua.openmedis.domain;

// Generated Aug 22, 2011 4:58:43 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Assets generated by hbm2java
 */
@Entity
@Table(name = "assets", catalog = "openmedis_demo")
public class Assets implements java.io.Serializable {

	private String assetId;
	private Agents agents;
	private Employees employees;
	private Donors donors;
	private Manufactures manufactures;
	private Suppliers suppliers;
	private Warrantycontract warrantycontract;
	private Location location;
	private Assetutilization assetutilization;
	private Assetstatus assetstatus;
	private AssetGenericName assetgenericname;
	private Integer umdns;
	private String assetFullName;
	private String model;
	private String serialNumber;
	private String internalIventoryNumber;
	private String responsiblePers;
	private Date purchaseDate;
	private Date installationDate;
	private Integer lifetime;
	private Double purchasePrice;
	private Double currentValue;
	private Date warrantyContractExp;
	private String warrantyContractNotes;
	private String notes;
	private String picture;
	private Date lastmodified;
	private String byUser;
	private Set<Workorders> workorderses = new HashSet<Workorders>(0);

	public Assets() {
	}

	public Assets(String assetId, Agents agents, Employees employees) {
		this.assetId = assetId;
		this.agents = agents;
		this.employees = employees;
	}

	public Assets(String assetId, Agents agents, Employees employees,
			Donors donors, Manufactures manufactures, Suppliers suppliers,
			Warrantycontract warrantycontract, Location location,
			Assetutilization assetutilization, Assetstatus assetstatus,
			AssetGenericName assetgenericname, Integer umdns,
			String assetFullName, String model, String serialNumber,
			String internalIventoryNumber, String responsiblePers,
			Date purchaseDate, Date installationDate, Integer lifetime,
			Double purchasePrice, Double currentValue,
			Date warrantyContractExp, String warrantyContractNotes,
			String notes, String picture, Date lastmodified, String byUser,
			Set<Workorders> workorderses) {
		this.assetId = assetId;
		this.agents = agents;
		this.employees = employees;
		this.donors = donors;
		this.manufactures = manufactures;
		this.suppliers = suppliers;
		this.warrantycontract = warrantycontract;
		this.location = location;
		this.assetutilization = assetutilization;
		this.assetstatus = assetstatus;
		this.assetgenericname = assetgenericname;
		this.umdns = umdns;
		this.assetFullName = assetFullName;
		this.model = model;
		this.serialNumber = serialNumber;
		this.internalIventoryNumber = internalIventoryNumber;
		this.responsiblePers = responsiblePers;
		this.purchaseDate = purchaseDate;
		this.installationDate = installationDate;
		this.lifetime = lifetime;
		this.purchasePrice = purchasePrice;
		this.currentValue = currentValue;
		this.warrantyContractExp = warrantyContractExp;
		this.warrantyContractNotes = warrantyContractNotes;
		this.notes = notes;
		this.picture = picture;
		this.lastmodified = lastmodified;
		this.byUser = byUser;
		this.workorderses = workorderses;
	}

	@Id
	@Column(name = "AssetID", unique = true, nullable = false, length = 13)
	public String getAssetId() {
		return this.assetId;
	}

	public void setAssetId(String assetId) {
		this.assetId = assetId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AgentID", nullable = false)
	public Agents getAgents() {
		return this.agents;
	}

	public void setAgents(Agents agents) {
		this.agents = agents;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EmployeeID", nullable = false)
	public Employees getEmployees() {
		return this.employees;
	}

	public void setEmployees(Employees employees) {
		this.employees = employees;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DonorID")
	public Donors getDonors() {
		return this.donors;
	}

	public void setDonors(Donors donors) {
		this.donors = donors;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ManufacturerID")
	public Manufactures getManufactures() {
		return this.manufactures;
	}

	public void setManufactures(Manufactures manufactures) {
		this.manufactures = manufactures;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SupplierID")
	public Suppliers getSuppliers() {
		return this.suppliers;
	}

	public void setSuppliers(Suppliers suppliers) {
		this.suppliers = suppliers;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WarrantyContractID")
	public Warrantycontract getWarrantycontract() {
		return this.warrantycontract;
	}

	public void setWarrantycontract(Warrantycontract warrantycontract) {
		this.warrantycontract = warrantycontract;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LocationID")
	public Location getLocation() {
		return this.location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AssetUtilizationID")
	public Assetutilization getAssetutilization() {
		return this.assetutilization;
	}

	public void setAssetutilization(Assetutilization assetutilization) {
		this.assetutilization = assetutilization;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AssetStatusID")
	public Assetstatus getAssetstatus() {
		return this.assetstatus;
	}

	public void setAssetstatus(Assetstatus assetstatus) {
		this.assetstatus = assetstatus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GenericAssetID")
	public AssetGenericName getAssetgenericname() {
		return this.assetgenericname;
	}

	public void setAssetgenericname(AssetGenericName assetgenericname) {
		this.assetgenericname = assetgenericname;
	}

	@Column(name = "UMDNS")
	public Integer getUmdns() {
		return this.umdns;
	}

	public void setUmdns(Integer umdns) {
		this.umdns = umdns;
	}

	@Column(name = "AssetFullName")
	public String getAssetFullName() {
		return this.assetFullName;
	}

	public void setAssetFullName(String assetFullName) {
		this.assetFullName = assetFullName;
	}

	@Column(name = "Model")
	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	@Column(name = "SerialNumber")
	public String getSerialNumber() {
		return this.serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	@Column(name = "InternalIventoryNumber")
	public String getInternalIventoryNumber() {
		return this.internalIventoryNumber;
	}

	public void setInternalIventoryNumber(String internalIventoryNumber) {
		this.internalIventoryNumber = internalIventoryNumber;
	}

	@Column(name = "ResponsiblePers", length = 50)
	public String getResponsiblePers() {
		return this.responsiblePers;
	}

	public void setResponsiblePers(String responsiblePers) {
		this.responsiblePers = responsiblePers;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "PurchaseDate", length = 10)
	public Date getPurchaseDate() {
		return this.purchaseDate;
	}

	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "InstallationDate", length = 10)
	public Date getInstallationDate() {
		return this.installationDate;
	}

	public void setInstallationDate(Date installationDate) {
		this.installationDate = installationDate;
	}

	@Column(name = "Lifetime")
	public Integer getLifetime() {
		return this.lifetime;
	}

	public void setLifetime(Integer lifetime) {
		this.lifetime = lifetime;
	}

	@Column(name = "PurchasePrice", precision = 24, scale = 0)
	public Double getPurchasePrice() {
		return this.purchasePrice;
	}

	public void setPurchasePrice(Double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	@Column(name = "CurrentValue", precision = 24, scale = 0)
	public Double getCurrentValue() {
		return this.currentValue;
	}

	public void setCurrentValue(Double currentValue) {
		this.currentValue = currentValue;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "WarrantyContractExp", length = 10)
	public Date getWarrantyContractExp() {
		return this.warrantyContractExp;
	}

	public void setWarrantyContractExp(Date warrantyContractExp) {
		this.warrantyContractExp = warrantyContractExp;
	}

	@Column(name = "WarrantyContractNotes", length = 65535)
	public String getWarrantyContractNotes() {
		return this.warrantyContractNotes;
	}

	public void setWarrantyContractNotes(String warrantyContractNotes) {
		this.warrantyContractNotes = warrantyContractNotes;
	}

	@Column(name = "Notes", length = 65535)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	@Column(name = "Picture")
	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastmodified", length = 19)
	public Date getLastmodified() {
		return this.lastmodified;
	}

	public void setLastmodified(Date lastmodified) {
		this.lastmodified = lastmodified;
	}

	@Column(name = "by_user", length = 25)
	public String getByUser() {
		return this.byUser;
	}

	public void setByUser(String byUser) {
		this.byUser = byUser;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "assets")
	public Set<Workorders> getWorkorderses() {
		return this.workorderses;
	}

	public void setWorkorderses(Set<Workorders> workorderses) {
		this.workorderses = workorderses;
	}

}
